import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue';
import vueJsx from '@vitejs/plugin-vue-jsx';
import { resolve } from "path";


export default defineConfig(configEnv => {

  return {
    base: "./",
    plugins: [
      vue(),
      vueJsx()
    ],
    server: {
      hmr: true,
      cors: true, 
      host: true,
      port: 5017
    },
    css: {
      preprocessorOptions: {
        scss: {
          silenceDeprecations: ['legacy-js-api']
        }
      }
    },
    resolve: {
      alias: {
        '@/': `${resolve(__dirname, 'src')}/`,
        '~': resolve(process.cwd())
      }
    }
  }
})
